import Vue from 'vue'
import App from './App.vue'
import JTableDemo from './components/JTable/JTableDemo.vue'
import NotFound from './components/NotFound.vue'
Vue.config.productionTip = false

const routes = {
  '/': App,
  '/table': JTableDemo
}
new Vue({
  data: {
    currentRoute: window.location.pathname
  },
  computed: {
    ViewComponent () {
      return routes[this.currentRoute] || NotFound
    }
  },
  render: h => h( routes[window.location.pathname]),
}).$mount('#app')
